package com.basic.jxl;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;

public class Demo1 {

	public static void main(String[] args) throws FileNotFoundException {
        try {
            String data = readDataByIndex(2, 11);
            System.out.println("======= "+data+" ==========");
        } catch (Exception e) {
            e.printStackTrace();
        }
	}
	
	public static String readDataByIndex(int columnIndex, int rowIndex)throws Exception{
		FileInputStream inputStream = new FileInputStream("C:\\Users\\15416\\Desktop\\云印客户信息表R1.xls");
		try {
        	Workbook workbook = Workbook.getWorkbook(inputStream);
            Sheet sheet = workbook.getSheet(0);
            Cell cell = sheet.getCell(columnIndex, rowIndex);
            return cell.getContents();
		}finally{
			inputStream.close();
		}
	}

}
